package fr.adfm.dto;

import java.io.Serializable;

import fr.adfm.entity.Client;

public class AdresseDto implements Serializable{

	private static final long serialVersionUID = 1L;

	private long AdresseId;
	
	private String nom;
	private String prenom;
	private String raisonSociale;
	private String rue1;
	private String rue2;
	private int codePostal;
	private String ville;
	
	private Client client;
	

	public static long getSerialversionuid() {
		return serialVersionUID;
	}


	public long getAdresseId() {
		return AdresseId;
	}


	public void setAdresseId(long adresseId) {
		AdresseId = adresseId;
	}


	public String getNom() {
		return nom;
	}


	public void setNom(String nom) {
		this.nom = nom;
	}


	public String getPrenom() {
		return prenom;
	}


	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}


	public String getRaisonSociale() {
		return raisonSociale;
	}


	public void setRaisonSociale(String raisonSociale) {
		this.raisonSociale = raisonSociale;
	}


	public String getRue1() {
		return rue1;
	}


	public void setRue1(String rue1) {
		this.rue1 = rue1;
	}


	public String getRue2() {
		return rue2;
	}


	public void setRue2(String rue2) {
		this.rue2 = rue2;
	}


	public int getCodePostal() {
		return codePostal;
	}


	public void setCodePostal(int codePostal) {
		this.codePostal = codePostal;
	}


	public String getVille() {
		return ville;
	}


	public void setVille(String ville) {
		this.ville = ville;
	}


	public Client getClient() {
		return client;
	}


	public void setClient(Client client) {
		this.client = client;
	}


	@Override
	public String toString() {
		return "AdresseDto [AdresseId=" + AdresseId + ", nom=" + nom
				+ ", prenom=" + prenom + ", raisonSociale=" + raisonSociale
				+ ", rue1=" + rue1 + ", rue2=" + rue2 + ", codePostal="
				+ codePostal + ", ville=" + ville + ", client=" + client + "]";
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((client == null) ? 0 : client.hashCode());
		result = prime * result + codePostal;
		result = prime * result + ((rue1 == null) ? 0 : rue1.hashCode());
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AdresseDto other = (AdresseDto) obj;
		if (client == null) {
			if (other.client != null)
				return false;
		} else if (!client.equals(other.client))
			return false;
		if (codePostal != other.codePostal)
			return false;
		if (rue1 == null) {
			if (other.rue1 != null)
				return false;
		} else if (!rue1.equals(other.rue1))
			return false;
		return true;
	}
	
	

	

	
}
